package com.wavehi.data_access_mybatis.service.impl;

import com.wavehi.data_access_mybatis.domain.Staff;
import com.wavehi.data_access_mybatis.mapper.StaffMapper;
import com.wavehi.data_access_mybatis.service.StaffService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author WaveHi
 * @Date 19/11/2021 下午 10:26
 * @Version 1.0
 * @Contact HJBWaveHi@163.com
 * @Description
 */
@Service
public class StaffServiceImpl implements StaffService {

    @Autowired
    private StaffMapper staffMapper;

    @Override
    public List<Staff> getAllStaffs() {
        return staffMapper.selectAll();
    }

    @Override
    public void add(Staff staff) {
        staffMapper.insert(staff);
    }
}
